<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: Denoising</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Denoising<div class="ingroups"><a class="el" href="../../d1/d0d/group__photo.html">Computational Photography</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7602ed5ae17b7de40152b922227c4e4f"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d79/group__photo__denoise.html#ga7602ed5ae17b7de40152b922227c4e4f">cv::denoise_TVL1</a> (const std::vector&lt; <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &gt; &amp;observations, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;result, double lambda=1.0, int niters=30)</td></tr>
<tr class="memdesc:ga7602ed5ae17b7de40152b922227c4e4f"><td class="mdescLeft"> </td><td class="mdescRight">Primal-dual algorithm is an algorithm for solving special types of variational problems (that is, finding a function to minimize some functional). As the image denoising, in particular, may be seen as the variational problem, primal-dual algorithm then can be used to perform denoising and this is exactly what is implemented.  <a href="../../d1/d79/group__photo__denoise.html#ga7602ed5ae17b7de40152b922227c4e4f">More...</a><br/></td></tr>
<tr class="separator:ga7602ed5ae17b7de40152b922227c4e4f"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga76abf348c234cecd0faf3c42ef3dc715"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d79/group__photo__denoise.html#ga76abf348c234cecd0faf3c42ef3dc715">cv::cuda::fastNlMeansDenoising</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, float h, int search_window=21, int block_size=7, <a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;stream=<a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>())</td></tr>
<tr class="memdesc:ga76abf348c234cecd0faf3c42ef3dc715"><td class="mdescLeft"> </td><td class="mdescRight">Perform image denoising using Non-local Means Denoising algorithm <a href="http://www.ipol.im/pub/algo/bcm_non_local_means_denoising">http://www.ipol.im/pub/algo/bcm_non_local_means_denoising</a> with several computational optimizations. Noise expected to be a gaussian white noise.  <a href="../../d1/d79/group__photo__denoise.html#ga76abf348c234cecd0faf3c42ef3dc715">More...</a><br/></td></tr>
<tr class="separator:ga76abf348c234cecd0faf3c42ef3dc715"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga4c6b0031f56ea3f98f768881279ffe93"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d79/group__photo__denoise.html#ga4c6b0031f56ea3f98f768881279ffe93">cv::fastNlMeansDenoising</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, float h=3, int templateWindowSize=7, int searchWindowSize=21)</td></tr>
<tr class="memdesc:ga4c6b0031f56ea3f98f768881279ffe93"><td class="mdescLeft"> </td><td class="mdescRight">Perform image denoising using Non-local Means Denoising algorithm <a href="http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/">http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/</a> with several computational optimizations. Noise expected to be a gaussian white noise.  <a href="../../d1/d79/group__photo__denoise.html#ga4c6b0031f56ea3f98f768881279ffe93">More...</a><br/></td></tr>
<tr class="separator:ga4c6b0031f56ea3f98f768881279ffe93"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga0db3ea0715152e56081265014b139bec"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d79/group__photo__denoise.html#ga0db3ea0715152e56081265014b139bec">cv::fastNlMeansDenoising</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, const std::vector&lt; float &gt; &amp;h, int templateWindowSize=7, int searchWindowSize=21, int normType=<a class="el" href="../../d2/de8/group__core__array.html#ggad12cefbcb5291cf958a85b4b67b6149fa7bacbe84d400336a8f26297d8e80e3a2">NORM_L2</a>)</td></tr>
<tr class="memdesc:ga0db3ea0715152e56081265014b139bec"><td class="mdescLeft"> </td><td class="mdescRight">Perform image denoising using Non-local Means Denoising algorithm <a href="http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/">http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/</a> with several computational optimizations. Noise expected to be a gaussian white noise.  <a href="../../d1/d79/group__photo__denoise.html#ga0db3ea0715152e56081265014b139bec">More...</a><br/></td></tr>
<tr class="separator:ga0db3ea0715152e56081265014b139bec"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga21abc1c8b0e15f78cd3eff672cb6c476"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d79/group__photo__denoise.html#ga21abc1c8b0e15f78cd3eff672cb6c476">cv::cuda::fastNlMeansDenoisingColored</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, float h_luminance, float photo_render, int search_window=21, int block_size=7, <a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;stream=<a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>())</td></tr>
<tr class="memdesc:ga21abc1c8b0e15f78cd3eff672cb6c476"><td class="mdescLeft"> </td><td class="mdescRight">Modification of fastNlMeansDenoising function for colored images.  <a href="../../d1/d79/group__photo__denoise.html#ga21abc1c8b0e15f78cd3eff672cb6c476">More...</a><br/></td></tr>
<tr class="separator:ga21abc1c8b0e15f78cd3eff672cb6c476"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga03aa4189fc3e31dafd638d90de335617"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d79/group__photo__denoise.html#ga03aa4189fc3e31dafd638d90de335617">cv::fastNlMeansDenoisingColored</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, float h=3, float hColor=3, int templateWindowSize=7, int searchWindowSize=21)</td></tr>
<tr class="memdesc:ga03aa4189fc3e31dafd638d90de335617"><td class="mdescLeft"> </td><td class="mdescRight">Modification of fastNlMeansDenoising function for colored images.  <a href="../../d1/d79/group__photo__denoise.html#ga03aa4189fc3e31dafd638d90de335617">More...</a><br/></td></tr>
<tr class="separator:ga03aa4189fc3e31dafd638d90de335617"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa501e71f52fb2dc17ff8ca5e7d2d3619"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d79/group__photo__denoise.html#gaa501e71f52fb2dc17ff8ca5e7d2d3619">cv::fastNlMeansDenoisingColoredMulti</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> srcImgs, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, int imgToDenoiseIndex, int temporalWindowSize, float h=3, float hColor=3, int templateWindowSize=7, int searchWindowSize=21)</td></tr>
<tr class="memdesc:gaa501e71f52fb2dc17ff8ca5e7d2d3619"><td class="mdescLeft"> </td><td class="mdescRight">Modification of fastNlMeansDenoisingMulti function for colored images sequences.  <a href="../../d1/d79/group__photo__denoise.html#gaa501e71f52fb2dc17ff8ca5e7d2d3619">More...</a><br/></td></tr>
<tr class="separator:gaa501e71f52fb2dc17ff8ca5e7d2d3619"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf4421bf068c4d632ea7f0aa38e0bf172"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d79/group__photo__denoise.html#gaf4421bf068c4d632ea7f0aa38e0bf172">cv::fastNlMeansDenoisingMulti</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> srcImgs, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, int imgToDenoiseIndex, int temporalWindowSize, float h=3, int templateWindowSize=7, int searchWindowSize=21)</td></tr>
<tr class="memdesc:gaf4421bf068c4d632ea7f0aa38e0bf172"><td class="mdescLeft"> </td><td class="mdescRight">Modification of fastNlMeansDenoising function for images sequence where consecutive images have been captured in small period of time. For example video. This version of the function is for grayscale images or for manual manipulation with colorspaces. For more details see <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394">http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394</a>  <a href="../../d1/d79/group__photo__denoise.html#gaf4421bf068c4d632ea7f0aa38e0bf172">More...</a><br/></td></tr>
<tr class="separator:gaf4421bf068c4d632ea7f0aa38e0bf172"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga723ffde1969430fede9241402e198151"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d79/group__photo__denoise.html#ga723ffde1969430fede9241402e198151">cv::fastNlMeansDenoisingMulti</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> srcImgs, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, int imgToDenoiseIndex, int temporalWindowSize, const std::vector&lt; float &gt; &amp;h, int templateWindowSize=7, int searchWindowSize=21, int normType=<a class="el" href="../../d2/de8/group__core__array.html#ggad12cefbcb5291cf958a85b4b67b6149fa7bacbe84d400336a8f26297d8e80e3a2">NORM_L2</a>)</td></tr>
<tr class="memdesc:ga723ffde1969430fede9241402e198151"><td class="mdescLeft"> </td><td class="mdescRight">Modification of fastNlMeansDenoising function for images sequence where consecutive images have been captured in small period of time. For example video. This version of the function is for grayscale images or for manual manipulation with colorspaces. For more details see <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394">http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394</a>  <a href="../../d1/d79/group__photo__denoise.html#ga723ffde1969430fede9241402e198151">More...</a><br/></td></tr>
<tr class="separator:ga723ffde1969430fede9241402e198151"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gafa990f16548581987e7e509b435c3648"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/d79/group__photo__denoise.html#gafa990f16548581987e7e509b435c3648">cv::cuda::nonLocalMeans</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> src, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> dst, float h, int search_window=21, int block_size=7, int borderMode=<a class="el" href="../../d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5afe14c13a4ea8b8e3b3ef399013dbae01">BORDER_DEFAULT</a>, <a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp;stream=<a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>())</td></tr>
<tr class="memdesc:gafa990f16548581987e7e509b435c3648"><td class="mdescLeft"> </td><td class="mdescRight">Performs pure non local means denoising without any simplification, and thus it is not fast.  <a href="../../d1/d79/group__photo__denoise.html#gafa990f16548581987e7e509b435c3648">More...</a><br/></td></tr>
<tr class="separator:gafa990f16548581987e7e509b435c3648"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga7602ed5ae17b7de40152b922227c4e4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7602ed5ae17b7de40152b922227c4e4f">◆ </a></span>denoise_TVL1()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::denoise_TVL1 </td>
          <td>(</td>
          <td class="paramtype">const std::vector&lt; <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &gt; &amp; </td>
          <td class="paramname"><em>observations</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double </td>
          <td class="paramname"><em>lambda</em> = <code>1.0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>niters</em> = <code>30</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.denoise_TVL1(</td><td class="paramname">observations, result[, lambda[, niters]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>Primal-dual algorithm is an algorithm for solving special types of variational problems (that is, finding a function to minimize some functional). As the image denoising, in particular, may be seen as the variational problem, primal-dual algorithm then can be used to perform denoising and this is exactly what is implemented. </p>
<p>It should be noted, that this implementation was taken from the July 2013 blog entry <a class="el" href="../../d0/de3/citelist.html#CITEREF_MA13">[178]</a> , which also contained (slightly more general) ready-to-use source code on Python. Subsequently, that code was rewritten on C++ with the usage of openCV by Vadim Pisarevsky at the end of July 2013 and finally it was slightly adapted by later authors.</p>
<p>Although the thorough discussion and justification of the algorithm involved may be found in <a class="el" href="../../d0/de3/citelist.html#CITEREF_ChambolleEtAl">[42]</a>, it might make sense to skim over it here, following <a class="el" href="../../d0/de3/citelist.html#CITEREF_MA13">[178]</a> . To begin with, we consider the 1-byte gray-level images as the functions from the rectangular domain of pixels (it may be seen as set \(\left\{(x,y)\in\mathbb{N}\times\mathbb{N}\mid 1\leq x\leq n,\;1\leq y\leq m\right\}\) for some \(m,\;n\in\mathbb{N}\)) into \(\{0,1,\dots,255\}\). We shall denote the noised images as \(f_i\) and with this view, given some image \(x\) of the same size, we may measure how bad it is by the formula</p>
<p class="formulaDsp">
\[\left\|\left\|\nabla x\right\|\right\| + \lambda\sum_i\left\|\left\|x-f_i\right\|\right\|\]
</p>
<p>\(\|\|\cdot\|\|\) here denotes \(L_2\)-norm and as you see, the first addend states that we want our image to be smooth (ideally, having zero gradient, thus being constant) and the second states that we want our result to be close to the observations we've got. If we treat \(x\) as a function, this is exactly the functional what we seek to minimize and here the Primal-Dual algorithm comes into play.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">observations</td><td>This array should contain one or more noised versions of the image that is to be restored. </td></tr>
    <tr><td class="paramname">result</td><td>Here the denoised image will be stored. There is no need to do pre-allocation of storage space, as it will be automatically allocated, if necessary. </td></tr>
    <tr><td class="paramname">lambda</td><td>Corresponds to \(\lambda\) in the formulas above. As it is enlarged, the smooth (blurred) images are treated more favorably than detailed (but maybe more noised) ones. Roughly speaking, as it becomes smaller, the result will be more blur but more sever outliers will be removed. </td></tr>
    <tr><td class="paramname">niters</td><td>Number of iterations that the algorithm will run. Of course, as more iterations as better, but it is hard to quantitatively refine this statement, so just use the default and increase it if the results are poor. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga76abf348c234cecd0faf3c42ef3dc715"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga76abf348c234cecd0faf3c42ef3dc715">◆ </a></span>fastNlMeansDenoising() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cuda::fastNlMeansDenoising </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>search_window</em> = <code>21</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>block_size</em> = <code>7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp; </td>
          <td class="paramname"><em>stream</em> = <code><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d7d/modules_2photo_2include_2opencv2_2photo_2cuda_8hpp.html">opencv2/photo/cuda.hpp</a>&gt;</code></p>
<p>Perform image denoising using Non-local Means Denoising algorithm <a href="http://www.ipol.im/pub/algo/bcm_non_local_means_denoising">http://www.ipol.im/pub/algo/bcm_non_local_means_denoising</a> with several computational optimizations. Noise expected to be a gaussian white noise. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Input 8-bit 1-channel, 2-channel or 3-channel image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as src . </td></tr>
    <tr><td class="paramname">h</td><td>Parameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise </td></tr>
    <tr><td class="paramname">search_window</td><td>Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater search_window - greater denoising time. Recommended value 21 pixels </td></tr>
    <tr><td class="paramname">block_size</td><td>Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels </td></tr>
    <tr><td class="paramname">stream</td><td><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html" title="This class encapsulates a queue of asynchronous calls. ">Stream</a> for the asynchronous invocations.</td></tr>
  </table>
  </dd>
</dl>
<p>This function expected to be applied to grayscale images. For colored images look at FastNonLocalMeansDenoising::labMethod.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d79/group__photo__denoise.html#ga76abf348c234cecd0faf3c42ef3dc715" title="Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising with several computational optimizations. Noise expected to be a gaussian white noise. ">fastNlMeansDenoising</a> </dd></dl>
</div>
</div>
<a id="ga4c6b0031f56ea3f98f768881279ffe93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga4c6b0031f56ea3f98f768881279ffe93">◆ </a></span>fastNlMeansDenoising() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fastNlMeansDenoising </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>h</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>templateWindowSize</em> = <code>7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>searchWindowSize</em> = <code>21</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.fastNlMeansDenoising(</td><td class="paramname">src[, dst[, h[, templateWindowSize[, searchWindowSize]]]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.fastNlMeansDenoising(</td><td class="paramname">src, h[, dst[, templateWindowSize[, searchWindowSize[, normType]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>Perform image denoising using Non-local Means Denoising algorithm <a href="http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/">http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/</a> with several computational optimizations. Noise expected to be a gaussian white noise. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as src . </td></tr>
    <tr><td class="paramname">templateWindowSize</td><td>Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels </td></tr>
    <tr><td class="paramname">searchWindowSize</td><td>Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels </td></tr>
    <tr><td class="paramname">h</td><td>Parameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise</td></tr>
  </table>
  </dd>
</dl>
<p>This function expected to be applied to grayscale images. For colored images look at fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting image to CIELAB colorspace and then separately denoise L and AB components with different h parameter. </p>
</div>
</div>
<a id="ga0db3ea0715152e56081265014b139bec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga0db3ea0715152e56081265014b139bec">◆ </a></span>fastNlMeansDenoising() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fastNlMeansDenoising </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; float &gt; &amp; </td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>templateWindowSize</em> = <code>7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>searchWindowSize</em> = <code>21</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>normType</em> = <code><a class="el" href="../../d2/de8/group__core__array.html#ggad12cefbcb5291cf958a85b4b67b6149fa7bacbe84d400336a8f26297d8e80e3a2">NORM_L2</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.fastNlMeansDenoising(</td><td class="paramname">src[, dst[, h[, templateWindowSize[, searchWindowSize]]]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.fastNlMeansDenoising(</td><td class="paramname">src, h[, dst[, templateWindowSize[, searchWindowSize[, normType]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>Perform image denoising using Non-local Means Denoising algorithm <a href="http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/">http://www.ipol.im/pub/algo/bcm_non_local_means_denoising/</a> with several computational optimizations. Noise expected to be a gaussian white noise. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Input 8-bit or 16-bit (only with NORM_L1) 1-channel, 2-channel, 3-channel or 4-channel image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as src . </td></tr>
    <tr><td class="paramname">templateWindowSize</td><td>Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels </td></tr>
    <tr><td class="paramname">searchWindowSize</td><td>Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels </td></tr>
    <tr><td class="paramname">h</td><td>Array of parameters regulating filter strength, either one parameter applied to all channels or one per channel in dst. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise </td></tr>
    <tr><td class="paramname">normType</td><td>Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1</td></tr>
  </table>
  </dd>
</dl>
<p>This function expected to be applied to grayscale images. For colored images look at fastNlMeansDenoisingColored. Advanced usage of this functions can be manual denoising of colored image in different colorspaces. Such approach is used in fastNlMeansDenoisingColored by converting image to CIELAB colorspace and then separately denoise L and AB components with different h parameter. </p>
</div>
</div>
<a id="ga21abc1c8b0e15f78cd3eff672cb6c476"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga21abc1c8b0e15f78cd3eff672cb6c476">◆ </a></span>fastNlMeansDenoisingColored() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cuda::fastNlMeansDenoisingColored </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>h_luminance</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>photo_render</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>search_window</em> = <code>21</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>block_size</em> = <code>7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp; </td>
          <td class="paramname"><em>stream</em> = <code><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d7d/modules_2photo_2include_2opencv2_2photo_2cuda_8hpp.html">opencv2/photo/cuda.hpp</a>&gt;</code></p>
<p>Modification of fastNlMeansDenoising function for colored images. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Input 8-bit 3-channel image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as src . </td></tr>
    <tr><td class="paramname">h_luminance</td><td>Parameter regulating filter strength. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise </td></tr>
    <tr><td class="paramname">photo_render</td><td>float The same as h but for color components. For most images value equals 10 will be enough to remove colored noise and do not distort colors </td></tr>
    <tr><td class="paramname">search_window</td><td>Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater search_window - greater denoising time. Recommended value 21 pixels </td></tr>
    <tr><td class="paramname">block_size</td><td>Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels </td></tr>
    <tr><td class="paramname">stream</td><td><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html" title="This class encapsulates a queue of asynchronous calls. ">Stream</a> for the asynchronous invocations.</td></tr>
  </table>
  </dd>
</dl>
<p>The function converts image to CIELAB colorspace and then separately denoise L and AB components with given h parameters using FastNonLocalMeansDenoising::simpleMethod function.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d79/group__photo__denoise.html#ga21abc1c8b0e15f78cd3eff672cb6c476" title="Modification of fastNlMeansDenoising function for colored images. ">fastNlMeansDenoisingColored</a> </dd></dl>
</div>
</div>
<a id="ga03aa4189fc3e31dafd638d90de335617"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga03aa4189fc3e31dafd638d90de335617">◆ </a></span>fastNlMeansDenoisingColored() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fastNlMeansDenoisingColored </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>h</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>hColor</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>templateWindowSize</em> = <code>7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>searchWindowSize</em> = <code>21</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.fastNlMeansDenoisingColored(</td><td class="paramname">src[, dst[, h[, hColor[, templateWindowSize[, searchWindowSize]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>Modification of fastNlMeansDenoising function for colored images. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Input 8-bit 3-channel image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as src . </td></tr>
    <tr><td class="paramname">templateWindowSize</td><td>Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels </td></tr>
    <tr><td class="paramname">searchWindowSize</td><td>Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels </td></tr>
    <tr><td class="paramname">h</td><td>Parameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise </td></tr>
    <tr><td class="paramname">hColor</td><td>The same as h but for color components. For most images value equals 10 will be enough to remove colored noise and do not distort colors</td></tr>
  </table>
  </dd>
</dl>
<p>The function converts image to CIELAB colorspace and then separately denoise L and AB components with given h parameters using fastNlMeansDenoising function. </p>
</div>
</div>
<a id="gaa501e71f52fb2dc17ff8ca5e7d2d3619"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaa501e71f52fb2dc17ff8ca5e7d2d3619">◆ </a></span>fastNlMeansDenoisingColoredMulti()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fastNlMeansDenoisingColoredMulti </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> </td>
          <td class="paramname"><em>srcImgs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>imgToDenoiseIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>temporalWindowSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>h</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>hColor</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>templateWindowSize</em> = <code>7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>searchWindowSize</em> = <code>21</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.fastNlMeansDenoisingColoredMulti(</td><td class="paramname">srcImgs, imgToDenoiseIndex, temporalWindowSize[, dst[, h[, hColor[, templateWindowSize[, searchWindowSize]]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>Modification of fastNlMeansDenoisingMulti function for colored images sequences. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">srcImgs</td><td>Input 8-bit 3-channel images sequence. All images should have the same type and size. </td></tr>
    <tr><td class="paramname">imgToDenoiseIndex</td><td>Target image to denoise index in srcImgs sequence </td></tr>
    <tr><td class="paramname">temporalWindowSize</td><td>Number of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as srcImgs images. </td></tr>
    <tr><td class="paramname">templateWindowSize</td><td>Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels </td></tr>
    <tr><td class="paramname">searchWindowSize</td><td>Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels </td></tr>
    <tr><td class="paramname">h</td><td>Parameter regulating filter strength for luminance component. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise. </td></tr>
    <tr><td class="paramname">hColor</td><td>The same as h but for color components.</td></tr>
  </table>
  </dd>
</dl>
<p>The function converts images to CIELAB colorspace and then separately denoise L and AB components with given h parameters using fastNlMeansDenoisingMulti function. </p>
</div>
</div>
<a id="gaf4421bf068c4d632ea7f0aa38e0bf172"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaf4421bf068c4d632ea7f0aa38e0bf172">◆ </a></span>fastNlMeansDenoisingMulti() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fastNlMeansDenoisingMulti </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> </td>
          <td class="paramname"><em>srcImgs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>imgToDenoiseIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>temporalWindowSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>h</em> = <code>3</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>templateWindowSize</em> = <code>7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>searchWindowSize</em> = <code>21</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.fastNlMeansDenoisingMulti(</td><td class="paramname">srcImgs, imgToDenoiseIndex, temporalWindowSize[, dst[, h[, templateWindowSize[, searchWindowSize]]]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.fastNlMeansDenoisingMulti(</td><td class="paramname">srcImgs, imgToDenoiseIndex, temporalWindowSize, h[, dst[, templateWindowSize[, searchWindowSize[, normType]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>Modification of fastNlMeansDenoising function for images sequence where consecutive images have been captured in small period of time. For example video. This version of the function is for grayscale images or for manual manipulation with colorspaces. For more details see <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394">http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">srcImgs</td><td>Input 8-bit 1-channel, 2-channel, 3-channel or 4-channel images sequence. All images should have the same type and size. </td></tr>
    <tr><td class="paramname">imgToDenoiseIndex</td><td>Target image to denoise index in srcImgs sequence </td></tr>
    <tr><td class="paramname">temporalWindowSize</td><td>Number of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as srcImgs images. </td></tr>
    <tr><td class="paramname">templateWindowSize</td><td>Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels </td></tr>
    <tr><td class="paramname">searchWindowSize</td><td>Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels </td></tr>
    <tr><td class="paramname">h</td><td>Parameter regulating filter strength. Bigger h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ga723ffde1969430fede9241402e198151"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga723ffde1969430fede9241402e198151">◆ </a></span>fastNlMeansDenoisingMulti() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::fastNlMeansDenoisingMulti </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga606feabe3b50ab6838f1ba89727aa07a">InputArrayOfArrays</a> </td>
          <td class="paramname"><em>srcImgs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>imgToDenoiseIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>temporalWindowSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::vector&lt; float &gt; &amp; </td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>templateWindowSize</em> = <code>7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>searchWindowSize</em> = <code>21</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>normType</em> = <code><a class="el" href="../../d2/de8/group__core__array.html#ggad12cefbcb5291cf958a85b4b67b6149fa7bacbe84d400336a8f26297d8e80e3a2">NORM_L2</a></code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.fastNlMeansDenoisingMulti(</td><td class="paramname">srcImgs, imgToDenoiseIndex, temporalWindowSize[, dst[, h[, templateWindowSize[, searchWindowSize]]]]</td><td>)</td></tr><tr><td style="width: 20px;"></td><td>dst</td><td>=</td><td>cv.fastNlMeansDenoisingMulti(</td><td class="paramname">srcImgs, imgToDenoiseIndex, temporalWindowSize, h[, dst[, templateWindowSize[, searchWindowSize[, normType]]]]</td><td>)</td></tr></table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../dc/d81/photo_8hpp.html">opencv2/photo.hpp</a>&gt;</code></p>
<p>Modification of fastNlMeansDenoising function for images sequence where consecutive images have been captured in small period of time. For example video. This version of the function is for grayscale images or for manual manipulation with colorspaces. For more details see <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394">http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.131.6394</a> </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">srcImgs</td><td>Input 8-bit or 16-bit (only with NORM_L1) 1-channel, 2-channel, 3-channel or 4-channel images sequence. All images should have the same type and size. </td></tr>
    <tr><td class="paramname">imgToDenoiseIndex</td><td>Target image to denoise index in srcImgs sequence </td></tr>
    <tr><td class="paramname">temporalWindowSize</td><td>Number of surrounding images to use for target image denoising. Should be odd. Images from imgToDenoiseIndex - temporalWindowSize / 2 to imgToDenoiseIndex - temporalWindowSize / 2 from srcImgs will be used to denoise srcImgs[imgToDenoiseIndex] image. </td></tr>
    <tr><td class="paramname">dst</td><td>Output image with the same size and type as srcImgs images. </td></tr>
    <tr><td class="paramname">templateWindowSize</td><td>Size in pixels of the template patch that is used to compute weights. Should be odd. Recommended value 7 pixels </td></tr>
    <tr><td class="paramname">searchWindowSize</td><td>Size in pixels of the window that is used to compute weighted average for given pixel. Should be odd. Affect performance linearly: greater searchWindowsSize - greater denoising time. Recommended value 21 pixels </td></tr>
    <tr><td class="paramname">h</td><td>Array of parameters regulating filter strength, either one parameter applied to all channels or one per channel in dst. Big h value perfectly removes noise but also removes image details, smaller h value preserves details but also preserves some noise </td></tr>
    <tr><td class="paramname">normType</td><td>Type of norm used for weight calculation. Can be either NORM_L2 or NORM_L1 </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="gafa990f16548581987e7e509b435c3648"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafa990f16548581987e7e509b435c3648">◆ </a></span>nonLocalMeans()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::cuda::nonLocalMeans </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>src</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>dst</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float </td>
          <td class="paramname"><em>h</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>search_window</em> = <code>21</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>block_size</em> = <code>7</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int </td>
          <td class="paramname"><em>borderMode</em> = <code><a class="el" href="../../d2/de8/group__core__array.html#gga209f2f4869e304c82d07739337eae7c5afe14c13a4ea8b8e3b3ef399013dbae01">BORDER_DEFAULT</a></code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html">Stream</a> &amp; </td>
          <td class="paramname"><em>stream</em> = <code><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html#a680af5adfeeb1cdaa5b7b13f680c0131">Stream::Null</a>()</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p><code>#include &lt;<a class="el" href="../../d2/d7d/modules_2photo_2include_2opencv2_2photo_2cuda_8hpp.html">opencv2/photo/cuda.hpp</a>&gt;</code></p>
<p>Performs pure non local means denoising without any simplification, and thus it is not fast. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">src</td><td>Source image. Supports only CV_8UC1, CV_8UC2 and CV_8UC3. </td></tr>
    <tr><td class="paramname">dst</td><td>Destination image. </td></tr>
    <tr><td class="paramname">h</td><td><a class="el" href="../../dc/d2b/classcv_1_1cuda_1_1Filter.html" title="Common interface for all CUDA filters : ">Filter</a> sigma regulating filter strength for color. </td></tr>
    <tr><td class="paramname">search_window</td><td>Size of search window. </td></tr>
    <tr><td class="paramname">block_size</td><td>Size of block used for computing weights. </td></tr>
    <tr><td class="paramname">borderMode</td><td>Border type. See borderInterpolate for details. BORDER_REFLECT101 , BORDER_REPLICATE , BORDER_CONSTANT , BORDER_REFLECT and BORDER_WRAP are supported for now. </td></tr>
    <tr><td class="paramname">stream</td><td><a class="el" href="../../d9/df3/classcv_1_1cuda_1_1Stream.html" title="This class encapsulates a queue of asynchronous calls. ">Stream</a> for the asynchronous version.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="../../d1/d79/group__photo__denoise.html#ga76abf348c234cecd0faf3c42ef3dc715" title="Perform image denoising using Non-local Means Denoising algorithm http://www.ipol.im/pub/algo/bcm_non_local_means_denoising with several computational optimizations. Noise expected to be a gaussian white noise. ">fastNlMeansDenoising</a> </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:41 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
